// components/fab/fab.js
Component({

    /**
     * 组件的属性列表
     */
    properties: {

    },

    /**
     * 组件的初始数据
     */
    data: {
        popup: {
            visible: false,
        },
        showUploadWay: false,
    },

    /**
     * 组件的方法列表
     */
    methods: {
        handleClick(e) {
            this.setData({
                ['popup.visible']: true,
            });
        },
        bloodSugarClick(e) {
            this.setData({
                ['popup.visible']: false,
                showUploadWay: true
            });
        },

        foodClick(e) {
            wx.switchTab({
              url: '/pages/foodrecord/foodrecord',
            })
        },

        sportClick(e) {
            wx.switchTab({
              url: '/pages/sportrecord/sportrecord',
            })
        },
    
        //点击遮罩层或关闭按钮时触发
        onVisibleChange(e) {
            this.setData({
                ['popup.visible']: false,
            });
        },
    }
})